#!/bin/bash
date_time=$(date +"%Y-%m-%d %H:%M:%S")
echo 当前系统时间：$date_time >> /tmp/sysinfo
echo -e "\n磁盘使用情况" >> /tmp/sysinfo
lsblk >> /tmp/sysinfo

echo -e "\n存在的登录用户" >> /tmp/sysinfo
cat /etc/passwd | grep "/bin/bash" | grep -v "root" >> /tmp/sysinfo

echo -e "\n当前server登录全部" >> /tmp/sysinfo
who >> /tmp/sysinfo

echo -e "\n内存使用情况" >> /tmp/sysinfo
free -gh >> /tmp/sysinfo
